package com.dhu.cst.ningtianzhe181310419.test;

public class TimeThread extends Thread {
    public void run(){
        RegisterActivity.button_getCode.setEnabled(false);
        for(int i=60;i>=0;i--){
            String temp = "剩余 " + i + "S";
            RegisterActivity.button_getCode.setText(temp);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        RegisterActivity.button_getCode.setText("获取验证码");
        RegisterActivity.button_getCode.setEnabled(true);
        interrupt();
    }
}
